﻿@using LiUTrading.MvcHelpers
@model IEnumerable<LiUTrading.Models.Ad>
@{
    ViewBag.Title = "Latest Ads";
}
    <fieldset>
    <legend>Latest Ads</legend>
<table class="dataTable">
    <thead>
        <tr>
            <th>
                Time added
            </th>
            <th>
                Title
            </th>
            <th>
                Category
            </th>
            <th>
                Price
            </th>
            <th>
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.DateTime)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Title)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Category)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Price)
                </td>
                <td>
                    <div class="addetails">
                        <button class="addetails" id="opener" data-addetailsid="@item.AdId">
                            Show Details</button>
                    </div>
                </td>
            </tr>
        
        }
    </tbody>
</table>
</fieldset>